Original article: JanEgilRefsnes translation: A Jie qi. XSL control statement 1. Conditional statement if... thenXSL also has conditional statements (haha ~~ It's amazing, like programming languages ). The specific syntax is to add an xsl: if element, like this xsl: ifmatch
Tutorials | control | statements
Seven. XSL Control statements
1. Conditional Statement If...thenXSL also has conditional statements (hehe ~ ~ Good, like the program language). The specific syntax is to add a xsl:if element, similar to this... some output ...
The example above is rewritten as:
2. Choose of XSLThe purpose of choose is to have multiple conditions, giving different displ
Original: A Egil refsnes translation: Atzie
Seven. XSL Control statements
1. Conditional Statement If...thenXSL also has conditional statements (hehe ~ ~ Good, like the program language). The specific syntax is to add a xsl:if element, similar to this... some output ...
The example above is rewritten as:
2. Choose of XSLThe purpose of choose is to have multiple conditions, giving different display resul
Tutorial
An introduction to XSL
two. xsl conversion three. XSL---implementation on the client Four: XSL---on server-side implementation Five. XSL index six XS L Filter and Query Seven. Xsl's control statement One. I
What is a select mode selection mode statement that extracts data from XML is a simple method to obtain data. these tags all have a select attribute, pay attention to the specific end-to-end data in XML. every xsl file needs to be imported into the xsl
What is the selection mode?The select mode statement extracts data
In the last period we talked about formatting XML documents with CSS (cascading style sheets), and the effect was not very satisfying. In fact, CSS is a good place to format HTML tags, just because it's simple to use in the example above.XML is just a data file in more time, how can it be changed into the HTML format that we see everyday? If we compare an XML file to a structured raw material, then the XSL is like "sieve" and "die", and the sieve choo
Original: Jan Egil Refsnes
Ii. XSL Conversion
1. Convert XML into HTML
How does XSL convert XML files into HTML files? Let's look at an example. below is part of the XML document:
...
Then, we use the following XSL file as an HTML template to convert XML data to an HTML file:
In the above Code, the
of file subdirectories. The xsl: value-of element is used to insert the content template of the child element into the current level.
Because the XSL style sheet itself is also an XML document, the beginning of the XSL file begins with an XML declaration. Xsl: the stylesheet element is used to declare that this is a s
which node in the XML source document is processed by the template. A template matches a node. Let's use an example to help us understand:
Suppose we want to process a section document that contains chapters and paragraphs. We use the Para element to define paragraphs and the chapter element to define chapters. Let's take a look at the possible values of the match attribute. The following statement describes that the template matches all the Para el
information from the 〈book〉 tag in an XML file.
3.Xsl:value-of: Read the information from a specific tag in the XML file. Properties: Select: Sets the information in which tag to read.
Example: 〈xsl:template select= "title": means to read information from the 〈title〉 tag.
Figure 3
4.Xsl:for-each: Applies a layout style to the same markup (similar to a circular statement) in an XML file.
Properties: Select: Sets the tag from which to read the data
Role of XSL: Convert XML into HTML
The following is a part of the XML document:
...
Then, we use the following XSL file as an HTML template to convert XML data to an HTML file:
In the above Code, the XSL: For-each element is used to locate which elements in the XML document need to be displayed according to the following template. The select attribute is used
Role of XSL: Convert XML into HTML
The following is a part of the XML document:
...
Then, we use the following XSL file as an HTML template to convert XML data to an HTML file:
In the above Code, the XSL: For-each element is used to locate which elements in the XML document need to be displayed according to the following template. The select attribute is used to
Original: A Egil refsnes translation: Atzie
Two. Transformation of XSL
1. Convert XML to HTMLHow does XSL convert an XML document into an HTML file? Let's take a look at an example where the following is part of an XML document:
...
We then convert the XML data to an HTML file as an HTML template for the following XSL file:
In the above code, the role of t
Tutorials | transformations
Two. Transformation of XSL
1. Convert XML to HTMLHow does XSL convert an XML document into an HTML file? Let's take a look at an example where the following is part of an XML document:
USA
Columbia
...
We then convert the XML data to an HTML file as an HTML template for the following
The XSL-FO applies a rectangular box (area) to display the output. The XSL pattern model of the XSL-FO area defines a series of rectangular (area) boxes to display the output. All outputs are formatted into these boxes and then displayed or printed to a target media.
The XSL-FO applies a rectangular box (area) to displ
An introduction to XSL
1.XSL---style sheet for XML
HTML Web pages use predefined identities (tags), which means that all tags have a clear meaning, such as However, XML does not have a fixed identity, we can build the identity we need, so browsers can't parse them automatically, for example In order to control the display of XML documents, it is necessary to establish a mechanism, CSS is one of them, bu
XML version = "1.0" encoding = "gb2312"
?>
XML-stylesheet type = "text/XSL" href = "Copy. XSL"
?>
Product Series
>
Product
>
Model
>
Mag xj570
Model
>
Imaging tube level = "0
. 24mm "vertical
= "0.12"
Dimensions
= "15"
>
0.28 extremely fine to Point
Picture Tube
>
Control
>
Visual onview view math
Control
>
The XSL-FO defines the output within the fo: flow element. The XSL-FO Page, Flow, and Block content blocks Flow into the Page and then output to the media. XSL-FO output is usually nested in the fo: block element, the fo: block is nested in the fo: flow element, and the fo: flow is embedded
XSL-FO in
Defines the o
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.